package Merlion.util.state;

import java.io.Serializable;

public class AddressState implements Serializable {

    private Long id;
    private String street = "";
    private String city = "";
    private String state = "";
    private String code = "";
    private String country = "";
    private boolean primaryAddress;
    private String type;//B(illing) or S(hipping)

    public AddressState() {
    }

    public AddressState(Long id, String street, String city, String state, String code, String country,
            boolean primaryAddress, String type) {
        this.setId(id);
        this.setStreet(street);
        this.setCity(city);
        this.setState(state);
        this.setCode(code);
        this.setCountry(country);
        this.setPrimaryAddress(primaryAddress);
        this.setType(type);
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        if (city.equals("")) {
            city = " ";
        }
        this.city = city;
    }

    public String getCode() {

        return code;
    }

    public void setCode(String code) {
        if (code.equals("")) {
            code = " ";
        }
        this.code = code;
    }

    public String getCountry() {
        return country;
    }

    public void setCountry(String country) {
        if (country.equals("")) {
            country = " ";
        }
        this.country = country;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public boolean isPrimaryAddress() {
        return primaryAddress;
    }

    public void setPrimaryAddress(boolean primaryAddress) {
        this.primaryAddress = primaryAddress;
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        if (state.equals("")) {
            state = " ";
        }
        this.state = state;
    }

    public String getStreet() {
        return street;
    }

    public void setStreet(String street) {
        if (street.equals("")) {
            street = " ";
        }
        this.street = street;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }
}
